package com.karst87.datastructures.linklist;

import java.io.IOException;

public class LinkListDemo
{
	public LinkListDemo()
	{
		LinkList list = new LinkList() ;
		
		for( int i = 1; i <= 10 ; i++ )
		{
			list.insertNode( new Integer( i )) ;
			System.out.println( list.crtData() ) ;
			while( !list.isEnd() )
			{
				System.out.println( list.nextData() ) ;
			}
			list.reset() ;
			
			while( !list.isEnd() )
			{
				list.remove() ;
			}
			list.remove() ;
			list.reset() ;
			
			if( list.isEmpty())
			{
				System.out.println( "There is no Node in list " ) ;
			}
			try
			{
				System.in.read() ;
			}
			catch( IOException $e )
			{
				
			}
		}
	}
}
